cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ... 
        
        posAR: cc.Label,
        pos: cc.Label,
        goldAR: cc.Node,
        gold: cc.Node
    },

    // use this for initialization
    onLoad: function () {
        var sheepAR = this.goldAR.parent;
        var posWorldSpaceAR = sheepAR.convertToWorldSpaceAR(cc.v2(this.goldAR.x, this.goldAR.y));
        var posWorldSpace = sheepAR.convertToWorldSpace(cc.v2(this.goldAR.x, this.goldAR.y));
        this.posAR.string = 'sheepAR pos' + '(' + parseInt(sheepAR.x) + ', ' + parseInt(sheepAR.y) + ')' 
        + ' WorldSpaceAR ' + '(' + parseInt(posWorldSpaceAR.x) + ', ' + parseInt(posWorldSpaceAR.y) + ')'
        + ' WorldSpace ' + '(' + parseInt(posWorldSpace.x) + ', ' + parseInt(posWorldSpace.y) + ')';
        
        // var sheep = this.gold.parent;
        // var pos = sheep.convertToWorldSpace(cc.v2(this.gold.x, this.gold.y));
        // this.pos.string = '(' + parseInt(pos.x) + ', ' + parseInt(pos.y) + ')';
    },

});
